package 华为OD机试B卷复用题.基础题;

import utils.MyUtil;

import java.io.File;
import java.io.FileNotFoundException;
import java.util.Arrays;
import java.util.Scanner;

public class HJ54_按身高和体重排队 {
    public static void main(String[] args) throws FileNotFoundException {
        Scanner in = new Scanner(new File("src/main/java/华为OD机试B卷复用题/基础题/input/54.txt"));
        MyUtil.START();
        Solution(in);
        MyUtil.END();
    }

    static void Solution(Scanner in) {
        // 经典多维度自定义排序，参考 C++ 结构体排序
        int N = in.nextInt();
        Node[] result = new Node[N];
        for (int i = 0; i < N; i++) {
            result[i] = new Node();
        }
        Arrays.sort(
                result,
                (a, b) -> {
                    return a.height != b.height ? a.height - b.height : a.weight - b.weight;
                });
    }

    static class Node {
        int index;
        int height;
        int weight;
    }
}
